package com.zyong.encryption.server;

import org.springframework.boot.SpringApplication;
import com.zyong.encryption.server.netty.NettyService;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;

/**
 * 
 * @author xiaoyu
 */
@SpringBootApplication
@EnableEurekaServer
@EnableScheduling
public class EncryptionServerApplication {
    public static void main(String[] args) {
        final ConfigurableApplicationContext applicationContext = SpringApplication.run(EncryptionServerApplication.class, args);
        final NettyService nettyService = applicationContext.getBean(NettyService.class);
        try {
            nettyService.start();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

    }

}
